home *** CD-ROM | disk | FTP | other *** search
/ Level 2005 Christmas (DVD) / Level_2005-XMAS_134_DVD_Knightshift.iso / Updates / Land of the Dead / System / GUI.u / GUIComponent_GUIMultiComponent_ScriptText.TextBuffer < prev    next >
Unknown  |  2005-12-07  |  10.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 41 af 01 2f 2f 20 43 6f |........|A..// Co|
|00000010| 70 79 72 69 67 68 74 20 | 28 43 29 20 32 30 30 35 |pyright |(C) 2005|
|00000020| 20 42 72 61 69 6e 62 6f | 78 20 47 61 6d 65 73 2e | Brainbo|x Games.|
|00000030| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|00000040| 72 76 65 64 2e 0d 0a 2f | 2f 20 53 65 70 74 65 6d |rved.../|/ Septem|
|00000050| 62 65 72 20 32 37 2c 20 | 32 30 30 35 0d 0a 2f 2f |ber 27, |2005..//|
|00000060| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | =======|========|
|00000070| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000080| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 0d 0a 2f | 2f 20 20 43 6c 61 73 73 |=====../|/ Class|
|000000b0| 3a 20 20 47 55 49 2e 47 | 55 49 4d 75 6c 74 69 43 |: GUI.G|UIMultiC|
|000000c0| 6f 6d 70 6f 6e 65 6e 74 | 0d 0a 2f 2f 0d 0a 2f 2f |omponent|..//..//|
|000000d0| 09 47 55 49 4d 75 6c 74 | 69 43 6f 6d 70 6f 6e 65 |.GUIMult|iCompone|
|000000e0| 6e 74 73 20 61 72 65 20 | 63 6f 6c 6c 65 63 74 69 |nts are |collecti|
|000000f0| 6f 6e 73 20 6f 66 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ons of c|omponent|
|00000100| 73 20 74 68 61 74 20 77 | 6f 72 6b 20 74 6f 67 65 |s that w|ork toge|
|00000110| 74 68 65 72 2e 0d 0a 2f | 2f 20 20 57 68 65 6e 20 |ther.../|/ When |
|00000120| 69 6e 69 74 69 61 6c 69 | 7a 65 64 2c 20 47 55 49 |initiali|zed, GUI|
|00000130| 4d 75 6c 74 69 43 6f 6d | 70 6f 6e 65 6e 74 73 20 |MultiCom|ponents |
|00000140| 74 72 61 6e 73 66 65 72 | 20 61 6c 6c 20 6f 66 20 |transfer| all of |
|00000150| 74 68 65 69 72 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |their co|mponents|
|00000160| 0d 0a 2f 2f 09 74 6f 20 | 74 68 65 20 74 6f 20 74 |..//.to |the to t|
|00000170| 68 65 20 47 55 49 50 61 | 67 65 20 74 68 61 74 20 |he GUIPa|ge that |
|00000180| 6f 77 6e 73 20 74 68 65 | 6d 2e 0d 0a 2f 2f 0d 0a |owns the|m...//..|
|00000190| 2f 2f 20 20 57 72 69 74 | 74 65 6e 20 62 79 20 4a |// Writ|ten by J|
|000001a0| 6f 65 20 57 69 6c 63 6f | 78 0d 0a 2f 2f 20 20 28 |oe Wilco|x..// (|
|000001b0| 63 29 20 32 30 30 32 2c | 20 45 70 69 63 20 47 61 |c) 2002,| Epic Ga|
|000001c0| 6d 65 73 2c 20 49 6e 63 | 2e 20 20 41 6c 6c 20 52 |mes, Inc|. All R|
|000001d0| 69 67 68 74 73 20 52 65 | 73 65 72 76 65 64 0d 0a |ights Re|served..|
|000001e0| 2f 2f 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |// =====|========|
|000001f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000200| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000210| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000220| 3d 3d 3d 3d 3d 3d 3d 0d | 0a 0d 0a 63 6c 61 73 73 |=======.|...class|
|00000230| 20 47 55 49 4d 75 6c 74 | 69 43 6f 6d 70 6f 6e 65 | GUIMult|iCompone|
|00000240| 6e 74 20 65 78 74 65 6e | 64 73 20 47 55 49 43 6f |nt exten|ds GUICo|
|00000250| 6d 70 6f 6e 65 6e 74 0d | 0a 09 09 4e 61 74 69 76 |mponent.|...Nativ|
|00000260| 65 3b 0d 0a 0d 0a 2f 2f | 20 28 63 70 70 74 65 78 |e;....//| (cpptex|
|00000270| 74 29 0d 0a 2f 2f 20 28 | 63 70 70 74 65 78 74 29 |t)..// (|cpptext)|
|00000280| 0d 0a 2f 2f 20 28 63 70 | 70 74 65 78 74 29 0d 0a |..// (cp|ptext)..|
|00000290| 2f 2f 20 28 63 70 70 74 | 65 78 74 29 0d 0a 2f 2f |// (cppt|ext)..//|
|000002a0| 20 28 63 70 70 74 65 78 | 74 29 0d 0a 2f 2f 20 28 | (cpptex|t)..// (|
|000002b0| 63 70 70 74 65 78 74 29 | 0d 0a 2f 2f 20 28 63 70 |cpptext)|..// (cp|
|000002c0| 70 74 65 78 74 29 0d 0a | 2f 2f 20 28 63 70 70 74 |ptext)..|// (cppt|
|000002d0| 65 78 74 29 0d 0a 2f 2f | 20 28 63 70 70 74 65 78 |ext)..//| (cpptex|
|000002e0| 74 29 0d 0a 2f 2f 20 28 | 63 70 70 74 65 78 74 29 |t)..// (|cpptext)|
|000002f0| 0d 0a 2f 2f 20 28 63 70 | 70 74 65 78 74 29 0d 0a |..// (cp|ptext)..|
|00000300| 2f 2f 20 28 63 70 70 74 | 65 78 74 29 0d 0a 2f 2f |// (cppt|ext)..//|
|00000310| 20 28 63 70 70 74 65 78 | 74 29 0d 0a 2f 2f 20 28 | (cpptex|t)..// (|
|00000320| 63 70 70 74 65 78 74 29 | 0d 0a 2f 2f 20 28 63 70 |cpptext)|..// (cp|
|00000330| 70 74 65 78 74 29 0d 0a | 2f 2f 20 28 63 70 70 74 |ptext)..|// (cppt|
|00000340| 65 78 74 29 0d 0a 2f 2f | 20 28 63 70 70 74 65 78 |ext)..//| (cpptex|
|00000350| 74 29 0d 0a 2f 2f 20 28 | 63 70 70 74 65 78 74 29 |t)..// (|cpptext)|
|00000360| 0d 0a 2f 2f 20 28 63 70 | 70 74 65 78 74 29 0d 0a |..// (cp|ptext)..|
|00000370| 2f 2f 20 28 63 70 70 74 | 65 78 74 29 0d 0a 2f 2f |// (cppt|ext)..//|
|00000380| 20 28 63 70 70 74 65 78 | 74 29 0d 0a 2f 2f 20 28 | (cpptex|t)..// (|
|00000390| 63 70 70 74 65 78 74 29 | 0d 0a 2f 2f 20 28 63 70 |cpptext)|..// (cp|
|000003a0| 70 74 65 78 74 29 0d 0a | 2f 2f 20 28 63 70 70 74 |ptext)..|// (cppt|
|000003b0| 65 78 74 29 0d 0a 0d 0a | 76 61 72 09 09 61 72 72 |ext)....|var..arr|
|000003c0| 61 79 3c 47 55 49 43 6f | 6d 70 6f 6e 65 6e 74 3e |ay<GUICo|mponent>|
|000003d0| 09 09 43 6f 6e 74 72 6f | 6c 73 3b 09 09 09 09 2f |..Contro|ls;..../|
|000003e0| 2f 20 41 6e 20 41 72 72 | 61 79 20 6f 66 20 43 6f |/ An Arr|ay of Co|
|000003f0| 6d 70 6f 6e 65 6e 74 73 | 20 74 68 61 74 20 6d 61 |mponents| that ma|
|00000400| 6b 65 20 75 70 20 74 68 | 69 73 20 43 6f 6e 74 72 |ke up th|is Contr|
|00000410| 6f 6c 0d 0a 76 61 72 20 | 09 61 72 72 61 79 3c 47 |ol..var |.array<G|
|00000420| 55 49 43 6f 6d 70 6f 6e | 65 6e 74 3e 09 09 43 6f |UICompon|ent>..Co|
|00000430| 6d 70 6f 6e 65 6e 74 73 | 3b 09 09 09 09 2f 2f 20 |mponents|;....// |
|00000440| 41 6e 20 41 72 72 61 79 | 20 6f 66 20 43 6f 6e 74 |An Array| of Cont|
|00000450| 72 6f 6c 73 20 74 68 61 | 74 20 63 61 6e 20 62 65 |rols tha|t can be|
|00000460| 20 74 61 62 62 65 64 20 | 74 6f 0d 0a 76 61 72 09 | tabbed |to..var.|
|00000470| 09 47 55 49 43 6f 6d 70 | 6f 6e 65 6e 74 09 09 09 |.GUIComp|onent...|
|00000480| 46 6f 63 75 73 65 64 43 | 6f 6e 74 72 6f 6c 3b 09 |FocusedC|ontrol;.|
|00000490| 09 09 2f 2f 20 57 68 69 | 63 68 20 63 6f 6d 70 6f |..// Whi|ch compo|
|000004a0| 6e 65 6e 74 20 69 6e 73 | 69 64 65 20 74 68 69 73 |nent ins|ide this|
|000004b0| 20 6f 6e 65 20 68 61 73 | 20 66 6f 63 75 73 0d 0a | one has| focus..|
|000004c0| 76 61 72 09 09 62 6f 6f | 6c 09 09 09 09 09 50 72 |var..boo|l.....Pr|
|000004d0| 6f 70 61 67 61 74 65 56 | 69 73 69 62 69 6c 69 74 |opagateV|isibilit|
|000004e0| 79 3b 09 2f 2f 20 44 6f | 65 73 20 63 68 61 6e 67 |y;.// Do|es chang|
|000004f0| 65 73 20 74 6f 20 76 69 | 73 69 62 69 6c 69 74 79 |es to vi|sibility|
|00000500| 20 70 72 6f 70 61 67 61 | 74 65 20 64 6f 77 6e 20 | propaga|te down |
|00000510| 74 68 65 20 6c 69 6e 65 | 0d 0a 0d 0a 0d 0a 66 75 |the line|......fu|
|00000520| 6e 63 74 69 6f 6e 20 6e | 61 74 69 76 65 20 49 6e |nction n|ative In|
|00000530| 69 74 69 61 6c 69 7a 65 | 43 6f 6e 74 72 6f 6c 73 |itialize|Controls|
|00000540| 28 29 3b 0d 0a 0d 0a 2f | 2f 20 53 74 75 62 0d 0a |();..../|/ Stub..|
|00000550| 66 75 6e 63 74 69 6f 6e | 20 49 6e 74 65 72 6e 61 |function| Interna|
|00000560| 6c 4f 6e 53 68 6f 77 28 | 29 3b 0d 0a 0d 0a 65 76 |lOnShow(|);....ev|
|00000570| 65 6e 74 20 69 6e 74 20 | 46 69 6e 64 43 6f 6d 70 |ent int |FindComp|
|00000580| 6f 6e 65 6e 74 49 6e 64 | 65 78 28 47 55 49 43 6f |onentInd|ex(GUICo|
|00000590| 6d 70 6f 6e 65 6e 74 20 | 57 68 6f 29 0d 0a 7b 0d |mponent |Who)..{.|
|000005a0| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 69 3b 0d 0a |..local |int i;..|
|000005b0| 0d 0a 09 69 66 20 28 57 | 68 6f 20 21 3d 20 4e 6f |...if (W|ho != No|
|000005c0| 6e 65 20 26 26 20 43 6f | 6d 70 6f 6e 65 6e 74 73 |ne && Co|mponents|
|000005d0| 2e 4c 65 6e 67 74 68 20 | 3e 20 30 29 0d 0a 20 20 |.Length |> 0).. |
|000005e0| 20 20 7b 0d 0a 09 09 66 | 6f 72 20 28 69 3d 30 3b | {....f|or (i=0;|
|000005f0| 69 3c 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 4c 65 6e |i<Compon|ents.Len|
|00000600| 67 74 68 3b 69 2b 2b 29 | 0d 0a 20 20 20 20 20 20 |gth;i++)|.. |
|00000610| 20 20 7b 0d 0a 09 09 09 | 69 66 20 28 57 68 6f 3d | {.....|if (Who=|
|00000620| 3d 43 6f 6d 70 6f 6e 65 | 6e 74 73 5b 69 5d 29 0d |=Compone|nts[i]).|
|00000630| 0a 09 09 09 09 72 65 74 | 75 72 6e 20 69 3b 0d 0a |.....ret|urn i;..|
|00000640| 20 20 20 20 09 7d 0d 0a | 20 20 20 20 7d 0d 0a 0d | .}..| }...|
|00000650| 0a 09 72 65 74 75 72 6e | 20 2d 31 3b 0d 0a 7d 0d |..return| -1;..}.|
|00000660| 0a 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 49 6e 69 74 |...funct|ion Init|
|00000670| 43 6f 6d 70 6f 6e 65 6e | 74 28 47 55 49 43 6f 6e |Componen|t(GUICon|
|00000680| 74 72 6f 6c 6c 65 72 20 | 4d 79 43 6f 6e 74 72 6f |troller |MyContro|
|00000690| 6c 6c 65 72 2c 20 47 55 | 49 43 6f 6d 70 6f 6e 65 |ller, GU|ICompone|
|000006a0| 6e 74 20 4d 79 4f 77 6e | 65 72 29 0d 0a 7b 0d 0a |nt MyOwn|er)..{..|
|000006b0| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 0d |.local i|nt i;...|
|000006c0| 0a 09 53 75 70 65 72 2e | 49 6e 69 74 63 6f 6d 70 |..Super.|Initcomp|
|000006d0| 6f 6e 65 6e 74 28 4d 79 | 43 6f 6e 74 72 6f 6c 6c |onent(My|Controll|
|000006e0| 65 72 2c 20 4d 79 4f 77 | 6e 65 72 29 3b 0d 0a 0d |er, MyOw|ner);...|
|000006f0| 0a 09 2f 2f 20 53 65 74 | 20 4f 6e 53 68 6f 77 20 |..// Set| OnShow |
|00000700| 64 65 6c 65 67 61 74 65 | 20 2d 20 53 65 74 56 69 |delegate| - SetVi|
|00000710| 73 69 62 69 6c 69 74 79 | 20 77 69 6c 6c 20 62 65 |sibility| will be|
|00000720| 20 63 61 6c 6c 65 64 20 | 69 6e 20 6e 65 78 74 20 | called |in next |
|00000730| 73 74 65 70 0d 0a 09 4f | 6e 53 68 6f 77 20 3d 20 |step...O|nShow = |
|00000740| 49 6e 74 65 72 6e 61 6c | 4f 6e 53 68 6f 77 3b 0d |Internal|OnShow;.|
|00000750| 0a 0d 0a 20 20 20 20 49 | 6e 69 74 69 61 6c 69 7a |... I|nitializ|
|00000760| 65 43 6f 6e 74 72 6f 6c | 73 28 29 3b 09 2f 2f 20 |eControl|s();.// |
|00000770| 42 75 69 6c 64 20 74 68 | 65 20 43 6f 6e 74 72 6f |Build th|e Contro|
|00000780| 6c 73 20 61 72 72 61 79 | 0d 0a 09 66 6f 72 20 28 |ls array|...for (|
|00000790| 69 3d 30 3b 69 3c 43 6f | 6e 74 72 6f 6c 73 2e 4c |i=0;i<Co|ntrols.L|
|000007a0| 65 6e 67 74 68 3b 69 2b | 2b 29 0d 0a 09 7b 0d 0a |ength;i+|+)...{..|
|000007b0| 09 09 69 66 20 28 43 6f | 6e 74 72 6f 6c 73 5b 69 |..if (Co|ntrols[i|
|000007c0| 5d 20 3d 3d 20 4e 6f 6e | 65 29 0d 0a 09 09 7b 0d |] == Non|e)....{.|
|000007d0| 0a 09 09 09 6c 6f 67 28 | 22 49 6e 76 61 6c 69 64 |....log(|"Invalid|
|000007e0| 20 63 6f 6e 74 72 6f 6c | 20 66 6f 75 6e 64 20 69 | control| found i|
|000007f0| 6e 22 40 73 74 72 69 6e | 67 28 43 6c 61 73 73 29 |n"@strin|g(Class)|
|00000800| 24 22 21 21 20 28 43 6f | 6e 74 72 6f 6c 22 40 69 |$"!! (Co|ntrol"@i|
|00000810| 24 22 29 22 2c 27 47 55 | 49 20 45 52 52 4f 52 27 |$")",'GU|I ERROR'|
|00000820| 29 3b 0d 0a 09 09 09 43 | 6f 6e 74 72 6f 6c 73 2e |);.....C|ontrols.|
|00000830| 52 65 6d 6f 76 65 28 69 | 2d 2d 2c 31 29 3b 0d 0a |Remove(i|--,1);..|
|00000840| 09 09 09 63 6f 6e 74 69 | 6e 75 65 3b 0d 0a 09 09 |...conti|nue;....|
|00000850| 7d 0d 0a 09 09 43 6f 6e | 74 72 6f 6c 73 5b 69 5d |}....Con|trols[i]|
|00000860| 2e 49 6e 69 74 43 6f 6d | 70 6f 6e 65 6e 74 28 4d |.InitCom|ponent(M|
|00000870| 79 43 6f 6e 74 72 6f 6c | 6c 65 72 2c 20 53 65 6c |yControl|ler, Sel|
|00000880| 66 29 3b 0d 0a 09 7d 0d | 0a 0d 0a 20 20 20 20 2f |f);...}.|... /|
|00000890| 2f 20 50 72 6f 70 61 67 | 61 74 65 20 73 6f 6d 65 |/ Propag|ate some|
|000008a0| 20 64 65 66 61 75 6c 74 | 73 0d 0a 20 20 20 20 69 | default|s.. i|
|000008b0| 66 20 28 50 72 6f 70 61 | 67 61 74 65 56 69 73 69 |f (Propa|gateVisi|
|000008c0| 62 69 6c 69 74 79 29 0d | 0a 20 20 20 20 09 53 65 |bility).|. .Se|
|000008d0| 74 56 69 73 69 62 69 6c | 69 74 79 28 62 56 69 73 |tVisibil|ity(bVis|
|000008e0| 69 62 6c 65 29 3b 0d 0a | 0d 0a 20 20 20 20 52 65 |ible);..|.. Re|
|000008f0| 6d 61 70 43 6f 6d 70 6f | 6e 65 6e 74 73 28 29 3b |mapCompo|nents();|
|00000900| 0d 0a 0d 0a 7d 0d 0a 0d | 0a 65 76 65 6e 74 20 47 |....}...|.event G|
|00000910| 55 49 43 6f 6d 70 6f 6e | 65 6e 74 20 41 64 64 43 |UICompon|ent AddC|
|00000920| 6f 6d 70 6f 6e 65 6e 74 | 28 73 74 72 69 6e 67 20 |omponent|(string |
|00000930| 43 6f 6d 70 6f 6e 65 6e | 74 43 6c 61 73 73 29 0d |Componen|tClass).|
|00000940| 0a 7b 0d 0a 20 20 20 20 | 6c 6f 63 61 6c 20 63 6c |.{.. |local cl|
|00000950| 61 73 73 3c 47 55 49 43 | 6f 6d 70 6f 6e 65 6e 74 |ass<GUIC|omponent|
|00000960| 3e 20 4e 65 77 43 6f 6d | 70 43 6c 61 73 73 3b 0d |> NewCom|pClass;.|
|00000970| 0a 20 20 20 20 6c 6f 63 | 61 6c 20 47 55 49 43 6f |. loc|al GUICo|
|00000980| 6d 70 6f 6e 65 6e 74 20 | 4e 65 77 43 6f 6d 70 3b |mponent |NewComp;|
|00000990| 0d 0a 0d 0a 20 20 20 20 | 4e 65 77 43 6f 6d 70 43 |.... |NewCompC|
|000009a0| 6c 61 73 73 20 3d 20 63 | 6c 61 73 73 3c 47 55 49 |lass = c|lass<GUI|
|000009b0| 43 6f 6d 70 6f 6e 65 6e | 74 3e 28 44 79 6e 61 6d |Componen|t>(Dynam|
|000009c0| 69 63 4c 6f 61 64 4f 62 | 6a 65 63 74 28 43 6f 6d |icLoadOb|ject(Com|
|000009d0| 70 6f 6e 65 6e 74 43 6c | 61 73 73 2c 63 6c 61 73 |ponentCl|ass,clas|
|000009e0| 73 27 63 6c 61 73 73 27 | 29 29 3b 0d 0a 20 20 20 |s'class'|));.. |
|000009f0| 20 69 66 20 28 4e 65 77 | 43 6f 6d 70 43 6c 61 73 | if (New|CompClas|
|00000a00| 73 20 21 3d 20 4e 6f 6e | 65 29 0d 0a 20 20 20 20 |s != Non|e).. |
|00000a10| 7b 0d 0a 0d 0a 20 20 20 | 20 20 20 20 20 4e 65 77 |{.... | New|
|00000a20| 43 6f 6d 70 20 3d 20 6e | 65 77 28 4e 6f 6e 65 29 |Comp = n|ew(None)|
|00000a30| 20 4e 65 77 43 6f 6d 70 | 43 6c 61 73 73 3b 0d 0a | NewComp|Class;..|
|00000a40| 20 20 20 20 20 20 20 20 | 69 66 20 28 4e 65 77 43 | |if (NewC|
|00000a50| 6f 6d 70 21 3d 4e 6f 6e | 65 29 0d 0a 20 20 20 20 |omp!=Non|e).. |
|00000a60| 20 20 20 20 7b 0d 0a 20 | 20 20 20 20 20 20 20 09 | {.. | .|
|00000a70| 4e 65 77 43 6f 6d 70 20 | 3d 20 41 70 70 65 6e 64 |NewComp |= Append|
|00000a80| 43 6f 6d 70 6f 6e 65 6e | 74 28 4e 65 77 43 6f 6d |Componen|t(NewCom|
|00000a90| 70 29 3b 0d 0a 09 09 09 | 72 65 74 75 72 6e 20 4e |p);.....|return N|
|00000aa0| 65 77 43 6f 6d 70 3b 0d | 0a 20 20 20 20 20 20 20 |ewComp;.|. |
|00000ab0| 20 7d 0d 0a 20 20 20 20 | 7d 0d 0a 0d 0a 20 20 20 | }.. |}.... |
|00000ac0| 20 6c 6f 67 28 22 47 55 | 49 4d 75 6c 74 69 43 6f | log("GU|IMultiCo|
|00000ad0| 6d 70 6f 6e 65 6e 74 3a | 3a 41 64 64 43 6f 6d 70 |mponent:|:AddComp|
|00000ae0| 6f 6e 65 6e 74 20 2d 20 | 43 6f 75 6c 64 20 6e 6f |onent - |Could no|
|00000af0| 74 20 63 72 65 61 74 65 | 20 63 6f 6d 70 6f 6e 65 |t create| compone|
|00000b00| 6e 74 22 40 43 6f 6d 70 | 6f 6e 65 6e 74 43 6c 61 |nt"@Comp|onentCla|
|00000b10| 73 73 2c 27 47 55 49 27 | 29 3b 0d 0a 09 72 65 74 |ss,'GUI'|);...ret|
|00000b20| 75 72 6e 20 6e 6f 6e 65 | 3b 0d 0a 7d 0d 0a 0d 0a |urn none|;..}....|
|00000b30| 65 76 65 6e 74 20 47 55 | 49 43 6f 6d 70 6f 6e 65 |event GU|ICompone|
|00000b40| 6e 74 20 49 6e 73 65 72 | 74 43 6f 6d 70 6f 6e 65 |nt Inser|tCompone|
|00000b50| 6e 74 28 47 55 49 43 6f | 6d 70 6f 6e 65 6e 74 20 |nt(GUICo|mponent |
|00000b60| 4e 65 77 43 6f 6d 70 2c | 20 69 6e 74 20 49 6e 64 |NewComp,| int Ind|
|00000b70| 65 78 29 0d 0a 7b 0d 0a | 09 69 66 20 28 49 6e 64 |ex)..{..|.if (Ind|
|00000b80| 65 78 20 3c 20 30 20 7c | 7c 20 49 6e 64 65 78 20 |ex < 0 ||| Index |
|00000b90| 3e 3d 20 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |>= Contr|ols.Leng|
|00000ba0| 74 68 29 0d 0a 09 09 72 | 65 74 75 72 6e 20 41 70 |th)....r|eturn Ap|
|00000bb0| 70 65 6e 64 43 6f 6d 70 | 6f 6e 65 6e 74 28 4e 65 |pendComp|onent(Ne|
|00000bc0| 77 43 6f 6d 70 29 3b 0d | 0a 0d 0a 09 43 6f 6e 74 |wComp);.|....Cont|
|00000bd0| 72 6f 6c 73 2e 49 6e 73 | 65 72 74 28 49 6e 64 65 |rols.Ins|ert(Inde|
|00000be0| 78 2c 20 31 29 3b 0d 0a | 09 43 6f 6e 74 72 6f 6c |x, 1);..|.Control|
|00000bf0| 73 5b 49 6e 64 65 78 5d | 20 3d 20 4e 65 77 43 6f |s[Index]| = NewCo|
|00000c00| 6d 70 3b 0d 0a 09 52 65 | 6d 61 70 43 6f 6d 70 6f |mp;...Re|mapCompo|
|00000c10| 6e 65 6e 74 73 28 29 3b | 0d 0a 09 72 65 74 75 72 |nents();|...retur|
|00000c20| 6e 20 4e 65 77 43 6f 6d | 70 3b 0d 0a 7d 0d 0a 0d |n NewCom|p;..}...|
|00000c30| 0a 65 76 65 6e 74 20 47 | 55 49 43 6f 6d 70 6f 6e |.event G|UICompon|
|00000c40| 65 6e 74 20 41 70 70 65 | 6e 64 43 6f 6d 70 6f 6e |ent Appe|ndCompon|
|00000c50| 65 6e 74 28 47 55 49 43 | 6f 6d 70 6f 6e 65 6e 74 |ent(GUIC|omponent|
|00000c60| 20 4e 65 77 43 6f 6d 70 | 29 0d 0a 7b 0d 0a 09 6c | NewComp|)..{...l|
|00000c70| 6f 63 61 6c 20 69 6e 74 | 20 69 6e 64 65 78 3b 0d |ocal int| index;.|
|00000c80| 0a 0d 0a 20 20 20 20 2f | 2f 20 41 74 74 65 6d 70 |... /|/ Attemp|
|00000c90| 74 20 74 6f 20 61 64 64 | 20 69 74 20 73 6f 72 74 |t to add| it sort|
|00000ca0| 65 64 20 69 6e 20 74 6f | 20 74 68 65 20 61 72 72 |ed in to| the arr|
|00000cb0| 61 79 2e 20 20 54 68 65 | 20 43 6f 6e 74 72 6f 6c |ay. The| Control|
|00000cc0| 73 20 61 72 72 61 79 20 | 69 73 20 73 6f 72 74 65 |s array |is sorte|
|00000cd0| 64 20 62 79 0d 0a 20 20 | 20 20 2f 2f 20 52 65 6e |d by.. | // Ren|
|00000ce0| 64 65 72 20 57 65 69 67 | 68 74 2e 0d 0a 0d 0a 20 |der Weig|ht..... |
|00000cf0| 20 20 20 77 68 69 6c 65 | 20 28 49 6e 64 65 78 3c | while| (Index<|
|00000d00| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 29 |Controls|.Length)|
|00000d10| 0d 0a 20 20 20 20 7b 0d | 0a 20 20 20 20 09 69 66 |.. {.|. .if|
|00000d20| 20 28 4e 65 77 43 6f 6d | 70 2e 52 65 6e 64 65 72 | (NewCom|p.Render|
|00000d30| 57 65 69 67 68 74 20 3c | 3d 20 43 6f 6e 74 72 6f |Weight <|= Contro|
|00000d40| 6c 73 5b 49 6e 64 65 78 | 5d 2e 52 65 6e 64 65 72 |ls[Index|].Render|
|00000d50| 57 65 69 67 68 74 29 09 | 2f 2f 20 57 65 20 66 6f |Weight).|// We fo|
|00000d60| 75 6e 64 20 6f 75 72 20 | 73 70 6f 74 0d 0a 20 20 |und our |spot.. |
|00000d70| 20 20 20 20 20 20 7b 0d | 0a 09 09 09 43 6f 6e 74 | {.|....Cont|
|00000d80| 72 6f 6c 73 2e 49 6e 73 | 65 72 74 28 49 6e 64 65 |rols.Ins|ert(Inde|
|00000d90| 78 2c 31 29 3b 0d 0a 09 | 09 09 62 72 65 61 6b 3b |x,1);...|..break;|
|00000da0| 0d 0a 20 20 20 20 20 20 | 20 20 7d 0d 0a 20 20 20 |.. | }.. |
|00000db0| 20 20 20 20 20 49 6e 64 | 65 78 2b 2b 3b 0d 0a 20 | Ind|ex++;.. |
|00000dc0| 20 20 20 7d 0d 0a 0d 0a | 20 20 20 20 2f 2f 20 43 | }....| // C|
|00000dd0| 6f 75 6c 64 6e 27 74 20 | 66 69 6e 64 20 61 20 73 |ouldn't |find a s|
|00000de0| 70 6f 74 2c 20 61 64 64 | 20 69 74 20 61 74 20 74 |pot, add| it at t|
|00000df0| 68 65 20 65 6e 64 0d 0a | 20 20 20 20 43 6f 6e 74 |he end..| Cont|
|00000e00| 72 6f 6c 73 5b 49 6e 64 | 65 78 5d 20 3d 20 4e 65 |rols[Ind|ex] = Ne|
|00000e10| 77 43 6f 6d 70 3b 0d 0a | 20 20 20 09 4e 65 77 43 |wComp;..| .NewC|
|00000e20| 6f 6d 70 2e 49 6e 69 74 | 43 6f 6d 70 6f 6e 65 6e |omp.Init|Componen|
|00000e30| 74 28 43 6f 6e 74 72 6f | 6c 6c 65 72 2c 20 53 65 |t(Contro|ller, Se|
|00000e40| 6c 66 29 3b 0d 0a 09 52 | 65 6d 61 70 43 6f 6d 70 |lf);...R|emapComp|
|00000e50| 6f 6e 65 6e 74 73 28 29 | 3b 0d 0a 20 20 20 20 72 |onents()|;.. r|
|00000e60| 65 74 75 72 6e 20 4e 65 | 77 43 6f 6d 70 3b 0d 0a |eturn Ne|wComp;..|
|00000e70| 7d 0d 0a 0d 0a 65 76 65 | 6e 74 20 62 6f 6f 6c 20 |}....eve|nt bool |
|00000e80| 52 65 6d 6f 76 65 43 6f | 6d 70 6f 6e 65 6e 74 28 |RemoveCo|mponent(|
|00000e90| 47 55 49 43 6f 6d 70 6f | 6e 65 6e 74 20 43 6f 6d |GUICompo|nent Com|
|00000ea0| 70 2c 20 6f 70 74 69 6f | 6e 61 6c 20 62 6f 6f 6c |p, optio|nal bool|
|00000eb0| 20 62 52 65 6d 61 70 29 | 0d 0a 7b 0d 0a 09 6c 6f | bRemap)|..{...lo|
|00000ec0| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 20 20 20 20 |cal int |i;.. |
|00000ed0| 66 6f 72 20 28 69 3d 30 | 3b 69 3c 43 6f 6e 74 72 |for (i=0|;i<Contr|
|00000ee0| 6f 6c 73 2e 4c 65 6e 67 | 74 68 3b 69 2b 2b 29 0d |ols.Leng|th;i++).|
|00000ef0| 0a 20 20 20 20 7b 0d 0a | 09 09 69 66 20 28 43 6f |. {..|..if (Co|
|00000f00| 6e 74 72 6f 6c 73 5b 69 | 5d 20 3d 3d 20 43 6f 6d |ntrols[i|] == Com|
|00000f10| 70 29 0d 0a 20 20 20 20 | 20 20 20 20 7b 0d 0a 20 |p).. | {.. |
|00000f20| 20 20 20 20 20 20 20 09 | 43 6f 6e 74 72 6f 6c 73 | .|Controls|
|00000f30| 2e 52 65 6d 6f 76 65 28 | 69 2c 31 29 3b 0d 0a 20 |.Remove(|i,1);.. |
|00000f40| 20 20 20 20 20 20 20 09 | 69 66 20 28 62 52 65 6d | .|if (bRem|
|00000f50| 61 70 29 0d 0a 09 20 20 | 20 20 20 20 20 20 09 52 |ap)... | .R|
|00000f60| 65 6d 61 70 43 6f 6d 70 | 6f 6e 65 6e 74 73 28 29 |emapComp|onents()|
|00000f70| 3b 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 72 |;.. | r|
|00000f80| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 0a 20 20 20 |eturn tr|ue;.. |
|00000f90| 20 20 20 20 20 7d 0d 0a | 09 7d 0d 0a 20 20 20 20 | }..|.}.. |
|00000fa0| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 7d |return f|alse;..}|
|00000fb0| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 46 69 6e |....func|tion Fin|
|00000fc0| 64 43 65 6e 74 65 72 50 | 6f 69 6e 74 28 47 55 49 |dCenterP|oint(GUI|
|00000fd0| 43 6f 6d 70 6f 6e 65 6e | 74 20 57 68 61 74 2c 20 |Componen|t What, |
|00000fe0| 6f 75 74 20 66 6c 6f 61 | 74 20 58 2c 20 6f 75 74 |out floa|t X, out|
|00000ff0| 20 66 6c 6f 61 74 20 59 | 29 0d 0a 7b 0d 0a 09 58 | float Y|)..{...X|
|00001000| 20 3d 20 57 68 61 74 2e | 41 63 74 75 61 6c 4c 65 | = What.|ActualLe|
|00001010| 66 74 28 29 20 2b 20 28 | 57 68 61 74 2e 41 63 74 |ft() + (|What.Act|
|00001020| 75 61 6c 57 69 64 74 68 | 28 29 2f 32 29 3b 0d 0a |ualWidth|()/2);..|
|00001030| 20 20 20 20 59 20 3d 20 | 57 68 61 74 2e 41 63 74 | Y = |What.Act|
|00001040| 75 61 6c 54 6f 70 28 29 | 20 2b 20 28 57 68 61 74 |ualTop()| + (What|
|00001050| 2e 41 63 74 75 61 6c 48 | 65 69 67 68 74 28 29 2f |.ActualH|eight()/|
|00001060| 32 29 3b 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |2);..}..|..functi|
|00001070| 6f 6e 20 66 6c 6f 61 74 | 20 46 69 6e 64 44 69 73 |on float| FindDis|
|00001080| 74 28 47 55 49 43 6f 6d | 70 6f 6e 65 6e 74 20 53 |t(GUICom|ponent S|
|00001090| 6f 75 72 63 65 2c 20 47 | 55 49 43 6f 6d 70 6f 6e |ource, G|UICompon|
|000010a0| 65 6e 74 20 54 61 72 67 | 65 74 29 0d 0a 7b 0d 0a |ent Targ|et)..{..|
|000010b0| 09 6c 6f 63 61 6c 20 66 | 6c 6f 61 74 20 61 2c 62 |.local f|loat a,b|
|000010c0| 3b 0d 0a 20 20 20 20 6c | 6f 63 61 6c 20 66 6c 6f |;.. l|ocal flo|
|000010d0| 61 74 20 78 5b 32 5d 2c | 79 5b 32 5d 3b 0d 0a 0d |at x[2],|y[2];...|
|000010e0| 0a 20 20 20 20 46 69 6e | 64 43 65 6e 74 65 72 50 |. Fin|dCenterP|
|000010f0| 6f 69 6e 74 28 53 6f 75 | 72 63 65 2c 78 5b 30 5d |oint(Sou|rce,x[0]|
|00001100| 2c 79 5b 30 5d 29 3b 0d | 0a 20 20 20 20 46 69 6e |,y[0]);.|. Fin|
|00001110| 64 43 65 6e 74 65 72 50 | 6f 69 6e 74 28 54 61 72 |dCenterP|oint(Tar|
|00001120| 67 65 74 2c 78 5b 31 5d | 2c 79 5b 31 5d 29 3b 0d |get,x[1]|,y[1]);.|
|00001130| 0a 0d 0a 20 20 09 61 20 | 3d 20 61 62 73 28 78 5b |... .a |= abs(x[|
|00001140| 30 5d 2d 78 5b 31 5d 29 | 3b 0d 0a 20 20 20 20 61 |0]-x[1])|;.. a|
|00001150| 20 3d 20 73 71 75 61 72 | 65 28 61 29 3b 0d 0a 20 | = squar|e(a);.. |
|00001160| 20 20 20 62 20 3d 20 61 | 62 73 28 79 5b 30 5d 2d | b = a|bs(y[0]-|
|00001170| 79 5b 31 5d 29 3b 0d 0a | 20 20 20 20 62 20 3d 20 |y[1]);..| b = |
|00001180| 73 71 75 61 72 65 28 62 | 29 3b 0d 0a 0d 0a 20 20 |square(b|);.... |
|00001190| 20 20 72 65 74 75 72 6e | 20 73 71 72 74 28 61 2b | return| sqrt(a+|
|000011a0| 62 29 3b 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |b);..}..|..functi|
|000011b0| 6f 6e 20 62 6f 6f 6c 20 | 54 65 73 74 43 6f 6e 74 |on bool |TestCont|
|000011c0| 72 6f 6c 73 28 69 6e 74 | 20 4d 6f 64 65 2c 20 69 |rols(int| Mode, i|
|000011d0| 6e 74 20 53 6f 75 72 63 | 65 49 6e 64 65 78 2c 20 |nt Sourc|eIndex, |
|000011e0| 69 6e 74 20 54 61 72 67 | 65 74 49 6e 64 65 78 29 |int Targ|etIndex)|
|000011f0| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 66 6c 6f 61 |..{...lo|cal floa|
|00001200| 74 20 73 58 31 2c 73 59 | 31 2c 73 58 32 2c 73 59 |t sX1,sY|1,sX2,sY|
|00001210| 32 3b 0d 0a 20 20 20 20 | 6c 6f 63 61 6c 20 66 6c |2;.. |local fl|
|00001220| 6f 61 74 20 74 58 31 2c | 74 59 31 2c 74 58 32 2c |oat tX1,|tY1,tX2,|
|00001230| 74 59 32 3b 0d 0a 0d 0a | 09 69 66 20 28 53 6f 75 |tY2;....|.if (Sou|
|00001240| 72 63 65 49 6e 64 65 78 | 3d 3d 54 61 72 67 65 74 |rceIndex|==Target|
|00001250| 49 6e 64 65 78 29 0d 0a | 20 20 20 20 09 72 65 74 |Index)..| .ret|
|00001260| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 0d 0a 20 20 |urn fals|e;.... |
|00001270| 20 20 69 66 20 28 43 6f | 6e 74 72 6f 6c 73 5b 54 | if (Co|ntrols[T|
|00001280| 61 72 67 65 74 49 6e 64 | 65 78 5d 2e 62 4e 65 76 |argetInd|ex].bNev|
|00001290| 65 72 46 6f 63 75 73 29 | 0d 0a 20 20 20 20 09 72 |erFocus)|.. .r|
|000012a0| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 0a 0d 0a |eturn fa|lse;....|
|000012b0| 09 73 58 31 20 3d 20 43 | 6f 6e 74 72 6f 6c 73 5b |.sX1 = C|ontrols[|
|000012c0| 53 6f 75 72 63 65 49 6e | 64 65 78 5d 2e 41 63 74 |SourceIn|dex].Act|
|000012d0| 75 61 6c 4c 65 66 74 28 | 29 3b 0d 0a 20 20 20 20 |ualLeft(|);.. |
|000012e0| 73 58 32 20 3d 20 73 58 | 31 20 2b 20 43 6f 6e 74 |sX2 = sX|1 + Cont|
|000012f0| 72 6f 6c 73 5b 53 6f 75 | 72 63 65 49 6e 64 65 78 |rols[Sou|rceIndex|
|00001300| 5d 2e 41 63 74 75 61 6c | 57 69 64 74 68 28 29 3b |].Actual|Width();|
|00001310| 0d 0a 09 73 59 31 20 3d | 20 43 6f 6e 74 72 6f 6c |...sY1 =| Control|
|00001320| 73 5b 53 6f 75 72 63 65 | 49 6e 64 65 78 5d 2e 41 |s[Source|Index].A|
|00001330| 63 74 75 61 6c 54 6f 70 | 28 29 3b 0d 0a 20 20 20 |ctualTop|();.. |
|00001340| 20 73 59 32 20 3d 20 73 | 59 31 20 2b 20 43 6f 6e | sY2 = s|Y1 + Con|
|00001350| 74 72 6f 6c 73 5b 53 6f | 75 72 63 65 49 6e 64 65 |trols[So|urceInde|
|00001360| 78 5d 2e 41 63 74 75 61 | 6c 48 65 69 67 68 74 28 |x].Actua|lHeight(|
|00001370| 29 3b 0d 0a 0d 0a 09 74 | 58 31 20 3d 20 43 6f 6e |);.....t|X1 = Con|
|00001380| 74 72 6f 6c 73 5b 54 61 | 72 67 65 74 49 6e 64 65 |trols[Ta|rgetInde|
|00001390| 78 5d 2e 41 63 74 75 61 | 6c 4c 65 66 74 28 29 3b |x].Actua|lLeft();|
|000013a0| 0d 0a 20 20 20 20 74 58 | 32 20 3d 20 74 58 31 20 |.. tX|2 = tX1 |
|000013b0| 2b 20 43 6f 6e 74 72 6f | 6c 73 5b 54 61 72 67 65 |+ Contro|ls[Targe|
|000013c0| 74 49 6e 64 65 78 5d 2e | 41 63 74 75 61 6c 57 69 |tIndex].|ActualWi|
|000013d0| 64 74 68 28 29 3b 0d 0a | 09 74 59 31 20 3d 20 43 |dth();..|.tY1 = C|
|000013e0| 6f 6e 74 72 6f 6c 73 5b | 54 61 72 67 65 74 49 6e |ontrols[|TargetIn|
|000013f0| 64 65 78 5d 2e 41 63 74 | 75 61 6c 54 6f 70 28 29 |dex].Act|ualTop()|
|00001400| 3b 0d 0a 20 20 20 20 74 | 59 32 20 3d 20 74 59 31 |;.. t|Y2 = tY1|
|00001410| 20 2b 20 43 6f 6e 74 72 | 6f 6c 73 5b 54 61 72 67 | + Contr|ols[Targ|
|00001420| 65 74 49 6e 64 65 78 5d | 2e 41 63 74 75 61 6c 48 |etIndex]|.ActualH|
|00001430| 65 69 67 68 74 28 29 3b | 0d 0a 0d 0a 20 20 20 20 |eight();|.... |
|00001440| 73 77 69 74 63 68 20 28 | 6d 6f 64 65 29 0d 0a 20 |switch (|mode).. |
|00001450| 20 20 20 7b 0d 0a 20 20 | 20 20 09 63 61 73 65 20 | {.. | .case |
|00001460| 30 20 3a 09 2f 2f 20 55 | 70 0d 0a 20 20 20 20 20 |0 :.// U|p.. |
|00001470| 20 20 20 09 72 65 74 75 | 72 6e 20 28 74 59 32 20 | .retu|rn (tY2 |
|00001480| 3c 3d 20 73 59 31 29 3b | 0d 0a 20 20 20 20 20 20 |<= sY1);|.. |
|00001490| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0d 0a 20 20 | br|eak;.. |
|000014a0| 20 20 20 20 20 20 63 61 | 73 65 20 31 20 3a 09 2f | ca|se 1 :./|
|000014b0| 2f 20 44 6f 77 6e 0d 0a | 20 20 20 20 20 20 20 20 |/ Down..| |
|000014c0| 09 72 65 74 75 72 6e 20 | 28 74 59 31 20 3e 3d 20 |.return |(tY1 >= |
|000014d0| 73 59 32 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |sY2);.. | |
|000014e0| 20 20 20 62 72 65 61 6b | 3b 0d 0a 0d 0a 20 20 20 | break|;.... |
|000014f0| 20 20 20 20 20 63 61 73 | 65 20 32 20 3a 20 09 2f | cas|e 2 : ./|
|00001500| 2f 20 4c 65 66 74 0d 0a | 20 20 20 20 20 20 20 20 |/ Left..| |
|00001510| 09 72 65 74 75 72 6e 20 | 28 74 58 32 20 3c 3d 20 |.return |(tX2 <= |
|00001520| 73 58 31 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |sX1);.. | |
|00001530| 20 20 20 62 72 65 61 6b | 3b 0d 0a 20 20 20 20 20 | break|;.. |
|00001540| 20 20 20 63 61 73 65 20 | 33 20 3a 09 2f 2f 20 52 | case |3 :.// R|
|00001550| 69 67 68 74 0d 0a 20 20 | 20 20 20 20 20 20 09 72 |ight.. | .r|
|00001560| 65 74 75 72 6e 20 28 74 | 58 31 20 3e 3d 20 73 58 |eturn (t|X1 >= sX|
|00001570| 32 29 3b 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |2);.. | |
|00001580| 20 62 72 65 61 6b 3b 0d | 0a 09 7d 0d 0a 0d 0a 20 | break;.|..}.... |
|00001590| 20 20 20 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b | retur|n false;|
|000015a0| 0d 0a 7d 0d 0a 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |..}.....|.functio|
|000015b0| 6e 20 4d 61 70 43 6f 6e | 74 72 6f 6c 73 28 29 0d |n MapCon|trols().|
|000015c0| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 63 |.{...loc|al int c|
|000015d0| 2c 69 2c 70 3b 0d 0a 20 | 20 20 20 6c 6f 63 61 6c |,i,p;.. | local|
|000015e0| 20 66 6c 6f 61 74 20 63 | 64 2c 64 69 73 74 3b 0d | float c|d,dist;.|
|000015f0| 0a 20 20 20 20 6c 6f 63 | 61 6c 20 47 55 49 43 6f |. loc|al GUICo|
|00001600| 6d 70 6f 6e 65 6e 74 20 | 43 6c 6f 73 65 73 74 3b |mponent |Closest;|
|00001610| 0d 0a 0d 0a 20 20 20 20 | 66 6f 72 20 28 63 3d 30 |.... |for (c=0|
|00001620| 3b 63 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;c<Contr|ols.Leng|
|00001630| 74 68 3b 63 2b 2b 29 0d | 0a 20 20 20 20 7b 0d 0a |th;c++).|. {..|
|00001640| 20 20 20 20 09 69 66 20 | 28 21 43 6f 6e 74 72 6f | .if |(!Contro|
|00001650| 6c 73 5b 63 5d 2e 62 4e | 65 76 65 72 46 6f 63 75 |ls[c].bN|everFocu|
|00001660| 73 29 0d 0a 20 20 20 20 | 20 20 20 20 7b 0d 0a 0d |s).. | {...|
|00001670| 0a 09 20 20 20 20 20 20 | 20 20 66 6f 72 20 28 70 |.. | for (p|
|00001680| 3d 30 3b 70 3c 34 3b 70 | 2b 2b 29 0d 0a 09 20 20 |=0;p<4;p|++)... |
|00001690| 20 20 20 20 20 20 7b 0d | 0a 09 20 20 20 20 20 20 | {.|.. |
|000016a0| 20 20 20 20 20 20 43 6c | 6f 73 65 73 74 20 3d 20 | Cl|osest = |
|000016b0| 6e 6f 6e 65 3b 0d 0a 09 | 20 20 20 20 20 20 20 20 |none;...| |
|000016c0| 20 20 20 20 69 66 20 28 | 43 6f 6e 74 72 6f 6c 73 | if (|Controls|
|000016d0| 5b 63 5d 2e 4c 69 6e 6b | 4f 76 65 72 72 69 64 65 |[c].Link|Override|
|000016e0| 73 5b 70 5d 21 3d 4e 6f | 6e 65 29 0d 0a 09 20 20 |s[p]!=No|ne)... |
|000016f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 43 6f | | Co|
|00001700| 6e 74 72 6f 6c 73 5b 63 | 5d 2e 4c 69 6e 6b 73 5b |ntrols[c|].Links[|
|00001710| 70 5d 20 3d 20 43 6f 6e | 74 72 6f 6c 73 5b 63 5d |p] = Con|trols[c]|
|00001720| 2e 4c 69 6e 6b 4f 76 65 | 72 72 69 64 65 73 5b 70 |.LinkOve|rrides[p|
|00001730| 5d 3b 0d 0a 09 20 20 20 | 20 20 20 20 20 20 20 20 |];... | |
|00001740| 20 65 6c 73 65 0d 0a 09 | 20 20 20 20 20 20 20 20 | else...| |
|00001750| 20 20 20 20 7b 0d 0a 09 | 20 20 20 20 20 20 20 20 | {...| |
|00001760| 20 20 20 20 20 20 20 20 | 66 6f 72 20 28 69 3d 30 | |for (i=0|
|00001770| 3b 69 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;i<Contr|ols.Leng|
|00001780| 74 68 3b 69 2b 2b 29 0d | 0a 09 20 20 20 20 20 20 |th;i++).|.. |
|00001790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 66 | | if|
|000017a0| 20 28 20 54 65 73 74 43 | 6f 6e 74 72 6f 6c 73 28 | ( TestC|ontrols(|
|000017b0| 70 2c 63 2c 69 29 20 29 | 0d 0a 09 20 20 20 20 20 |p,c,i) )|... |
|000017c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|000017d0| 0d 0a 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|000017e0| 20 20 20 20 20 20 20 20 | 20 20 20 64 69 73 74 20 | | dist |
|000017f0| 3d 20 46 69 6e 64 44 69 | 73 74 28 43 6f 6e 74 72 |= FindDi|st(Contr|
|00001800| 6f 6c 73 5b 63 5d 2c 43 | 6f 6e 74 72 6f 6c 73 5b |ols[c],C|ontrols[|
|00001810| 69 5d 29 3b 0d 0a 09 20 | 20 20 20 20 20 20 20 20 |i]);... | |
|00001820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00001830| 66 20 28 20 28 43 6c 6f | 73 65 73 74 20 3d 3d 20 |f ( (Clo|sest == |
|00001840| 4e 6f 6e 65 29 20 7c 7c | 20 28 64 69 73 74 20 3c |None) ||| (dist <|
|00001850| 20 63 64 29 20 29 0d 0a | 09 20 20 20 20 20 20 20 | cd) )..|. |
|00001860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001870| 20 7b 0d 0a 09 20 20 20 | 20 20 20 20 20 20 20 20 | {... | |
|00001880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001890| 20 43 6c 6f 73 65 73 74 | 20 3d 20 43 6f 6e 74 72 | Closest| = Contr|
|000018a0| 6f 6c 73 5b 69 5d 3b 0d | 0a 09 20 20 20 20 20 20 |ols[i];.|.. |
|000018b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018c0| 20 20 20 20 20 20 63 64 | 20 3d 20 64 69 73 74 3b | cd| = dist;|
|000018d0| 0d 0a 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|000018e0| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0d 0a 09 20 | | }... |
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001900| 20 20 20 7d 0d 0a 09 20 | 20 20 20 20 20 20 20 20 | }... | |
|00001910| 20 20 20 20 20 20 20 43 | 6f 6e 74 72 6f 6c 73 5b | C|ontrols[|
|00001920| 63 5d 2e 4c 69 6e 6b 73 | 5b 70 5d 20 3d 20 43 6c |c].Links|[p] = Cl|
|00001930| 6f 73 65 73 74 3b 0d 0a | 09 20 20 20 20 20 20 20 |osest;..|. |
|00001940| 20 20 20 20 20 7d 0d 0a | 09 20 20 20 20 20 20 20 | }..|. |
|00001950| 20 7d 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 20 | }.. | }.. |
|00001960| 20 20 20 7d 0d 0a 7d 0d | 0a 0d 0a 0d 0a 2f 2f 20 | }..}.|.....// |
|00001970| 52 65 6d 61 70 43 6f 6d | 70 6f 6e 65 6e 74 73 20 |RemapCom|ponents |
|00001980| 2d 20 54 68 69 73 20 73 | 65 74 73 20 74 68 65 20 |- This s|ets the |
|00001990| 74 61 62 20 6f 72 64 65 | 72 20 66 6f 72 20 61 6c |tab orde|r for al|
|000019a0| 6c 20 74 68 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |l the co|mponents|
|000019b0| 20 6f 6e 20 74 68 69 73 | 20 70 61 67 65 0d 0a 65 | on this| page..e|
|000019c0| 76 65 6e 74 20 52 65 6d | 61 70 43 6f 6d 70 6f 6e |vent Rem|apCompon|
|000019d0| 65 6e 74 73 28 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |ents()..|{...loca|
|000019e0| 6c 20 69 6e 74 20 69 2c | 6a 3b 0d 0a 0d 0a 2f 2f |l int i,|j;....//|
|000019f0| 20 52 65 6d 6f 76 65 20 | 66 72 6f 6d 20 30 20 69 | Remove |from 0 i|
|00001a00| 6e 73 74 65 61 64 20 6f | 66 20 31 2c 20 69 6e 20 |nstead o|f 1, in |
|00001a10| 63 61 73 65 20 63 6f 6e | 74 72 6f 6c 20 77 61 73 |case con|trol was|
|00001a20| 20 72 65 6d 6f 76 65 64 | 2c 20 61 6e 64 20 74 68 | removed|, and th|
|00001a30| 61 74 20 63 6f 6e 74 72 | 6f 6c 20 77 61 73 20 63 |at contr|ol was c|
|00001a40| 6f 6d 70 6f 6e 65 6e 74 | 73 5b 30 5d 0d 0a 2f 2f |omponent|s[0]..//|
|00001a50| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 67 65 74 20 | Otherwi|se, get |
|00001a60| 61 63 63 65 73 73 20 6e | 6f 6e 65 73 0d 0a 09 69 |access n|ones...i|
|00001a70| 66 20 28 43 6f 6d 70 6f | 6e 65 6e 74 73 2e 4c 65 |f (Compo|nents.Le|
|00001a80| 6e 67 74 68 3e 30 29 0d | 0a 09 20 09 43 6f 6d 70 |ngth>0).|.. .Comp|
|00001a90| 6f 6e 65 6e 74 73 2e 52 | 65 6d 6f 76 65 28 30 2c |onents.R|emove(0,|
|00001aa0| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 4c 65 6e 67 74 |Componen|ts.Lengt|
|00001ab0| 68 29 3b 09 2f 2f 20 43 | 6c 65 61 72 20 74 68 65 |h);.// C|lear the|
|00001ac0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 20 41 72 72 61 79 | Compone|nt Array|
|00001ad0| 0d 0a 0d 0a 09 66 6f 72 | 20 28 69 3d 30 3b 69 3c |.....for| (i=0;i<|
|00001ae0| 43 6f 6e 74 72 6f 6c 73 | 2e 4c 65 6e 67 74 68 3b |Controls|.Length;|
|00001af0| 69 2b 2b 29 0d 0a 20 20 | 20 20 7b 0d 0a 20 20 20 |i++).. | {.. |
|00001b00| 20 09 69 66 20 28 43 6f | 6e 74 72 6f 6c 73 5b 69 | .if (Co|ntrols[i|
|00001b10| 5d 2e 62 54 61 62 53 74 | 6f 70 29 0d 0a 20 20 20 |].bTabSt|op).. |
|00001b20| 20 20 20 20 20 7b 0d 0a | 20 20 20 20 20 20 20 20 | {..| |
|00001b30| 09 66 6f 72 20 28 6a 3d | 30 3b 6a 3c 43 6f 6d 70 |.for (j=|0;j<Comp|
|00001b40| 6f 6e 65 6e 74 73 2e 4c | 65 6e 67 74 68 3b 6a 2b |onents.L|ength;j+|
|00001b50| 2b 29 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |+).. | |
|00001b60| 09 69 66 20 28 20 43 6f | 6e 74 72 6f 6c 73 5b 69 |.if ( Co|ntrols[i|
|00001b70| 5d 2e 54 61 62 4f 72 64 | 65 72 20 3c 3d 20 43 6f |].TabOrd|er <= Co|
|00001b80| 6d 70 6f 6e 65 6e 74 73 | 5b 6a 5d 2e 54 61 62 4f |mponents|[j].TabO|
|00001b90| 72 64 65 72 20 29 0d 0a | 20 20 20 20 20 20 20 20 |rder )..| |
|00001ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 72 65 61 | | brea|
|00001bb0| 6b 3b 0d 0a 0d 0a 09 09 | 09 69 66 20 28 6a 20 3c |k;......|.if (j <|
|00001bc0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 73 2e 4c 65 6e 67 | Compone|nts.Leng|
|00001bd0| 74 68 29 0d 0a 09 09 09 | 09 43 6f 6d 70 6f 6e 65 |th).....|.Compone|
|00001be0| 6e 74 73 2e 49 6e 73 65 | 72 74 28 6a 2c 20 31 29 |nts.Inse|rt(j, 1)|
|00001bf0| 3b 0d 0a 0d 0a 09 09 09 | 43 6f 6d 70 6f 6e 65 6e |;.......|Componen|
|00001c00| 74 73 5b 6a 5d 20 3d 20 | 43 6f 6e 74 72 6f 6c 73 |ts[j] = |Controls|
|00001c10| 5b 69 5d 3b 0d 0a 20 20 | 20 20 20 20 20 20 20 7d |[i];.. | }|
|00001c20| 0d 0a 20 20 20 20 7d 0d | 0a 7d 0d 0a 0d 0a 65 76 |.. }.|.}....ev|
|00001c30| 65 6e 74 20 53 65 74 46 | 6f 63 75 73 28 47 55 49 |ent SetF|ocus(GUI|
|00001c40| 43 6f 6d 70 6f 6e 65 6e | 74 20 57 68 6f 29 0d 0a |Componen|t Who)..|
|00001c50| 7b 0d 0a 09 69 66 20 28 | 57 68 6f 3d 3d 4e 6f 6e |{...if (|Who==Non|
|00001c60| 65 29 0d 0a 09 7b 0d 0a | 09 09 46 6f 63 75 73 46 |e)...{..|..FocusF|
|00001c70| 69 72 73 74 28 4e 6f 6e | 65 29 3b 0d 0a 09 09 72 |irst(Non|e);....r|
|00001c80| 65 74 75 72 6e 3b 0d 0a | 09 7d 0d 0a 09 65 6c 73 |eturn;..|.}...els|
|00001c90| 65 0d 0a 09 09 46 6f 63 | 75 73 65 64 43 6f 6e 74 |e....Foc|usedCont|
|00001ca0| 72 6f 6c 20 3d 20 57 68 | 6f 3b 0d 0a 0d 0a 09 4d |rol = Wh|o;.....M|
|00001cb0| 65 6e 75 53 74 61 74 65 | 43 68 61 6e 67 65 28 4d |enuState|Change(M|
|00001cc0| 53 41 54 5f 46 6f 63 75 | 73 65 64 29 3b 0d 0a 0d |SAT_Focu|sed);...|
|00001cd0| 0a 09 69 66 20 28 4d 65 | 6e 75 4f 77 6e 65 72 21 |..if (Me|nuOwner!|
|00001ce0| 3d 4e 6f 6e 65 29 0d 0a | 09 09 4d 65 6e 75 4f 77 |=None)..|..MenuOw|
|00001cf0| 6e 65 72 2e 53 65 74 46 | 6f 63 75 73 28 73 65 6c |ner.SetF|ocus(sel|
|00001d00| 66 29 3b 0d 0a 7d 0d 0a | 0d 0a 65 76 65 6e 74 20 |f);..}..|..event |
|00001d10| 4c 6f 73 65 46 6f 63 75 | 73 28 47 55 49 43 6f 6d |LoseFocu|s(GUICom|
|00001d20| 70 6f 6e 65 6e 74 20 53 | 65 6e 64 65 72 29 0d 0a |ponent S|ender)..|
|00001d30| 7b 0d 0a 09 46 6f 63 75 | 73 65 64 43 6f 6e 74 72 |{...Focu|sedContr|
|00001d40| 6f 6c 20 3d 20 4e 6f 6e | 65 3b 0d 0a 09 53 75 70 |ol = Non|e;...Sup|
|00001d50| 65 72 2e 4c 6f 73 65 46 | 6f 63 75 73 28 53 65 6e |er.LoseF|ocus(Sen|
|00001d60| 64 65 72 29 3b 0d 0a 7d | 0d 0a 0d 0a 0d 0a 65 76 |der);..}|......ev|
|00001d70| 65 6e 74 20 62 6f 6f 6c | 20 46 6f 63 75 73 46 69 |ent bool| FocusFi|
|00001d80| 72 73 74 28 47 55 49 43 | 6f 6d 70 6f 6e 65 6e 74 |rst(GUIC|omponent|
|00001d90| 20 53 65 6e 64 65 72 29 | 0d 0a 7b 0d 0a 20 20 20 | Sender)|..{.. |
|00001da0| 20 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 0d | local i|nt i;...|
|00001db0| 0a 09 69 66 20 28 43 6f | 6d 70 6f 6e 65 6e 74 73 |..if (Co|mponents|
|00001dc0| 2e 4c 65 6e 67 74 68 3e | 30 29 0d 0a 09 7b 0d 0a |.Length>|0)...{..|
|00001dd0| 20 20 20 20 09 66 6f 72 | 20 28 69 3d 30 3b 69 3c | .for| (i=0;i<|
|00001de0| 43 6f 6d 70 6f 6e 65 6e | 74 73 2e 4c 65 6e 67 74 |Componen|ts.Lengt|
|00001df0| 68 3b 69 2b 2b 29 0d 0a | 20 20 20 20 20 20 20 20 |h;i++)..| |
|00001e00| 7b 0d 0a 20 20 20 20 20 | 20 20 20 09 69 66 20 28 |{.. | .if (|
|00001e10| 43 6f 6d 70 6f 6e 65 6e | 74 73 5b 69 5d 2e 62 56 |Componen|ts[i].bV|
|00001e20| 69 73 69 62 6c 65 20 26 | 26 20 43 6f 6d 70 6f 6e |isible &|& Compon|
|00001e30| 65 6e 74 73 5b 69 5d 2e | 4d 65 6e 75 53 74 61 74 |ents[i].|MenuStat|
|00001e40| 65 20 21 3d 20 4d 53 41 | 54 5f 44 69 73 61 62 6c |e != MSA|T_Disabl|
|00001e50| 65 64 29 0d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ed).. | |
|00001e60| 20 7b 0d 0a 09 09 20 20 | 09 09 43 6f 6d 70 6f 6e | {.... |..Compon|
|00001e70| 65 6e 74 73 5b 69 5d 2e | 53 65 74 46 6f 63 75 73 |ents[i].|SetFocus|
|00001e80| 28 4e 6f 6e 65 29 3b 0d | 0a 09 09 09 09 72 65 74 |(None);.|.....ret|
|00001e90| 75 72 6e 20 74 72 75 65 | 3b 0d 0a 20 20 20 20 20 |urn true|;.. |
|00001ea0| 20 20 20 20 20 20 20 7d | 0d 0a 20 20 20 20 20 20 | }|.. |
|00001eb0| 20 20 7d 0d 0a 20 20 20 | 20 7d 0d 0a 0d 0a 09 66 | }.. | }.....f|
|00001ec0| 6f 72 20 28 69 3d 30 3b | 69 3c 43 6f 6e 74 72 6f |or (i=0;|i<Contro|
|00001ed0| 6c 73 2e 4c 65 6e 67 74 | 68 3b 69 2b 2b 29 0d 0a |ls.Lengt|h;i++)..|
|00001ee0| 20 20 20 20 7b 0d 0a 20 | 20 20 20 09 69 66 20 28 | {.. | .if (|
|00001ef0| 20 43 6f 6e 74 72 6f 6c | 73 5b 69 5d 2e 46 6f 63 | Control|s[i].Foc|
|00001f00| 75 73 46 69 72 73 74 28 | 53 65 6e 64 65 72 29 20 |usFirst(|Sender) |
|00001f10| 29 0d 0a 20 20 20 20 20 | 20 20 20 09 72 65 74 75 |).. | .retu|
|00001f20| 72 6e 20 74 72 75 65 3b | 0d 0a 20 20 20 20 7d 0d |rn true;|.. }.|
|00001f30| 0a 0d 0a 20 20 20 20 72 | 65 74 75 72 6e 20 66 61 |... r|eturn fa|
|00001f40| 6c 73 65 3b 0d 0a 7d 0d | 0a 0d 0a 0d 0a 65 76 65 |lse;..}.|.....eve|
|00001f50| 6e 74 20 62 6f 6f 6c 20 | 46 6f 63 75 73 4c 61 73 |nt bool |FocusLas|
|00001f60| 74 28 47 55 49 43 6f 6d | 70 6f 6e 65 6e 74 20 53 |t(GUICom|ponent S|
|00001f70| 65 6e 64 65 72 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |ender)..|{...loca|
|00001f80| 6c 20 69 6e 74 20 69 3b | 0d 0a 0d 0a 09 69 66 20 |l int i;|.....if |
|00001f90| 28 43 6f 6d 70 6f 6e 65 | 6e 74 73 2e 4c 65 6e 67 |(Compone|nts.Leng|
|00001fa0| 74 68 3e 30 29 0d 0a 09 | 7b 0d 0a 20 20 20 20 09 |th>0)...|{.. .|
|00001fb0| 66 6f 72 20 28 69 3d 43 | 6f 6d 70 6f 6e 65 6e 74 |for (i=C|omponent|
|00001fc0| 73 2e 4c 65 6e 67 74 68 | 2d 31 3b 69 3e 3d 30 3b |s.Length|-1;i>=0;|
|00001fd0| 69 2d 2d 29 0d 0a 20 20 | 20 20 20 20 20 20 7b 0d |i--).. | {.|
|00001fe0| 0a 20 20 20 20 20 20 20 | 20 09 69 66 20 28 43 6f |. | .if (Co|
|00001ff0| 6d 70 6f 6e 65 6e 74 73 | 5b 69 5d 2e 62 56 69 73 |mponents|[i].bVis|
|00002000| 69 62 6c 65 20 26 26 20 | 43 6f 6d 70 6f 6e 65 6e |ible && |Componen|
|00002010| 74 73 5b 69 5d 2e 4d 65 | 6e 75 53 74 61 74 65 20 |ts[i].Me|nuState |
|00002020| 21 3d 20 4d 53 41 54 5f | 44 69 73 61 62 6c 65 64 |!= MSAT_|Disabled|
|00002030| 29 0d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7b |).. | {|
|00002040| 0d 0a 09 09 09 09 43 6f | 6d 70 6f 6e 65 6e 74 73 |......Co|mponents|
|00002050| 5b 69 5d 2e 53 65 74 46 | 6f 63 75 73 28 4e 6f 6e |[i].SetF|ocus(Non|
|00002060| 65 29 3b 0d 0a 09 09 09 | 09 72 65 74 75 72 6e 20 |e);.....|.return |
|00002070| 74 72 75 65 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |true;.. | |
|00002080| 20 20 20 7d 0d 0a 20 20 | 20 20 20 20 20 20 7d 0d | }.. | }.|
|00002090| 0a 09 7d 0d 0a 0d 0a 09 | 66 6f 72 20 28 69 3d 43 |..}.....|for (i=C|
|000020a0| 6f 6e 74 72 6f 6c 73 2e | 4c 65 6e 67 74 68 2d 31 |ontrols.|Length-1|
|000020b0| 3b 69 3e 3d 30 3b 69 2d | 2d 29 0d 0a 20 20 20 20 |;i>=0;i-|-).. |
|000020c0| 7b 0d 0a 20 20 20 20 09 | 69 66 20 28 20 43 6f 6e |{.. .|if ( Con|
|000020d0| 74 72 6f 6c 73 5b 69 5d | 2e 46 6f 63 75 73 4c 61 |trols[i]|.FocusLa|
|000020e0| 73 74 28 53 65 6e 64 65 | 72 29 20 29 0d 0a 20 20 |st(Sende|r) ).. |
|000020f0| 20 20 20 20 20 20 09 72 | 65 74 75 72 6e 20 74 72 | .r|eturn tr|
|00002100| 75 65 3b 0d 0a 20 20 20 | 20 7d 0d 0a 0d 0a 20 20 |ue;.. | }.... |
|00002110| 20 20 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d | return| false;.|
|00002120| 0a 0d 0a 7d 0d 0a 0d 0a | 65 76 65 6e 74 20 62 6f |...}....|event bo|
|00002130| 6f 6c 20 4e 65 78 74 43 | 6f 6e 74 72 6f 6c 28 47 |ol NextC|ontrol(G|
|00002140| 55 49 43 6f 6d 70 6f 6e | 65 6e 74 20 53 65 6e 64 |UICompon|ent Send|
|00002150| 65 72 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |er)..{..|.local i|
|00002160| 6e 74 20 49 6e 64 65 78 | 3b 0d 0a 0d 0a 09 49 6e |nt Index|;.....In|
|00002170| 64 65 78 20 3d 20 46 69 | 6e 64 43 6f 6d 70 6f 6e |dex = Fi|ndCompon|
|00002180| 65 6e 74 49 6e 64 65 78 | 28 53 65 6e 64 65 72 29 |entIndex|(Sender)|
|00002190| 3b 0d 0a 0d 0a 20 20 20 | 20 69 66 20 28 49 6e 64 |;.... | if (Ind|
|000021a0| 65 78 3d 3d 2d 31 29 0d | 0a 20 20 20 20 7b 0d 0a |ex==-1).|. {..|
|000021b0| 20 20 20 20 09 69 66 20 | 28 20 53 75 70 65 72 2e | .if |( Super.|
|000021c0| 4e 65 78 74 43 6f 6e 74 | 72 6f 6c 28 53 65 6c 66 |NextCont|rol(Self|
|000021d0| 29 20 29 0d 0a 20 20 20 | 20 20 20 20 20 09 72 65 |) ).. | .re|
|000021e0| 74 75 72 6e 20 74 72 75 | 65 3b 0d 0a 20 20 20 20 |turn tru|e;.. |
|000021f0| 20 20 20 20 65 6c 73 65 | 0d 0a 09 20 20 20 20 09 | else|... .|
|00002200| 72 65 74 75 72 6e 20 46 | 6f 63 75 73 46 69 72 73 |return F|ocusFirs|
|00002210| 74 28 6e 6f 6e 65 29 3b | 0d 0a 20 20 20 20 7d 0d |t(none);|.. }.|
|00002220| 0a 0d 0a 20 20 20 20 49 | 6e 64 65 78 2b 2b 3b 0d |... I|ndex++;.|
|00002230| 0a 0d 0a 20 20 20 20 2f | 2f 20 46 69 6e 64 20 74 |... /|/ Find t|
|00002240| 68 65 20 6e 65 78 74 20 | 70 6f 73 73 69 62 6c 65 |he next |possible|
|00002250| 20 63 6f 6d 70 6f 6e 65 | 6e 74 0d 0a 20 20 20 20 | compone|nt.. |
|00002260| 77 68 69 6c 65 20 28 49 | 6e 64 65 78 3c 43 6f 6d |while (I|ndex<Com|
|00002270| 70 6f 6e 65 6e 74 73 2e | 4c 65 6e 67 74 68 29 0d |ponents.|Length).|
|00002280| 0a 20 20 20 20 7b 0d 0a | 20 20 20 20 09 69 66 20 |. {..| .if |
|00002290| 28 43 6f 6d 70 6f 6e 65 | 6e 74 73 5b 49 6e 64 65 |(Compone|nts[Inde|
|000022a0| 78 5d 2e 4d 65 6e 75 53 | 74 61 74 65 21 3d 4d 53 |x].MenuS|tate!=MS|
|000022b0| 41 54 5f 44 69 73 61 62 | 6c 65 64 20 26 26 20 43 |AT_Disab|led && C|
|000022c0| 6f 6d 70 6f 6e 65 6e 74 | 73 5b 49 6e 64 65 78 5d |omponent|s[Index]|
|000022d0| 2e 62 56 69 73 69 62 6c | 65 29 0d 0a 20 20 20 20 |.bVisibl|e).. |
|000022e0| 09 7b 0d 0a 20 20 20 20 | 20 20 20 20 09 43 6f 6d |.{.. | .Com|
|000022f0| 70 6f 6e 65 6e 74 73 5b | 49 6e 64 65 78 5d 2e 53 |ponents[|Index].S|
|00002300| 65 74 46 6f 63 75 73 28 | 4e 6f 6e 65 29 3b 0d 0a |etFocus(|None);..|
|00002310| 20 20 20 20 20 20 20 20 | 09 72 65 74 75 72 6e 20 | |.return |
|00002320| 74 72 75 65 3b 0d 0a 20 | 20 20 20 20 20 20 20 7d |true;.. | }|
|00002330| 0d 0a 0d 0a 20 20 20 20 | 09 49 6e 64 65 78 2b 2b |.... |.Index++|
|00002340| 3b 0d 0a 20 20 20 20 7d | 0d 0a 0d 0a 20 20 20 09 |;.. }|.... .|
|00002350| 69 66 20 28 20 53 75 70 | 65 72 2e 4e 65 78 74 43 |if ( Sup|er.NextC|
|00002360| 6f 6e 74 72 6f 6c 28 73 | 65 6c 66 29 20 29 0d 0a |ontrol(s|elf) )..|
|00002370| 20 20 20 20 20 20 20 09 | 72 65 74 75 72 6e 20 74 | .|return t|
|00002380| 72 75 65 3b 0d 0a 20 20 | 20 20 65 6c 73 65 0d 0a |rue;.. | else..|
|00002390| 20 20 20 20 20 20 20 09 | 72 65 74 75 72 6e 20 46 | .|return F|
|000023a0| 6f 63 75 73 46 69 72 73 | 74 28 6e 6f 6e 65 29 3b |ocusFirs|t(none);|
|000023b0| 0d 0a 7d 0d 0a 0d 0a 65 | 76 65 6e 74 20 62 6f 6f |..}....e|vent boo|
|000023c0| 6c 20 50 72 65 76 43 6f | 6e 74 72 6f 6c 28 47 55 |l PrevCo|ntrol(GU|
|000023d0| 49 43 6f 6d 70 6f 6e 65 | 6e 74 20 53 65 6e 64 65 |ICompone|nt Sende|
|000023e0| 72 29 0d 0a 7b 0d 0a 0d | 0a 09 6c 6f 63 61 6c 20 |r)..{...|..local |
|000023f0| 69 6e 74 20 49 6e 64 65 | 78 3b 0d 0a 0d 0a 09 49 |int Inde|x;.....I|
|00002400| 6e 64 65 78 20 3d 20 46 | 69 6e 64 43 6f 6d 70 6f |ndex = F|indCompo|
|00002410| 6e 65 6e 74 49 6e 64 65 | 78 28 53 65 6e 64 65 72 |nentInde|x(Sender|
|00002420| 29 3b 0d 0a 0d 0a 20 20 | 20 20 69 66 20 28 49 6e |);.... | if (In|
|00002430| 64 65 78 3d 3d 2d 31 29 | 0d 0a 20 20 20 20 7b 0d |dex==-1)|.. {.|
|00002440| 0a 20 20 20 20 09 69 66 | 20 28 20 53 75 70 65 72 |. .if| ( Super|
|00002450| 2e 50 52 65 76 43 6f 6e | 74 72 6f 6c 28 53 65 6c |.PRevCon|trol(Sel|
|00002460| 66 29 20 29 0d 0a 20 20 | 20 20 20 20 20 20 09 72 |f) ).. | .r|
|00002470| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 0a 20 20 20 |eturn tr|ue;.. |
|00002480| 20 20 20 20 20 65 6c 73 | 65 0d 0a 09 20 20 20 20 | els|e... |
|00002490| 09 72 65 74 75 72 6e 20 | 46 6f 63 75 73 4c 61 73 |.return |FocusLas|
|000024a0| 74 28 6e 6f 6e 65 29 3b | 0d 0a 09 7d 0d 0a 0d 0a |t(none);|...}....|
|000024b0| 20 20 20 20 49 6e 64 65 | 78 2d 2d 3b 0d 0a 0d 0a | Inde|x--;....|
|000024c0| 20 20 20 20 77 68 69 6c | 65 20 28 49 6e 64 65 78 | whil|e (Index|
|000024d0| 3e 3d 30 29 0d 0a 20 20 | 20 20 7b 0d 0a 20 20 20 |>=0).. | {.. |
|000024e0| 20 09 69 66 20 28 43 6f | 6d 70 6f 6e 65 6e 74 73 | .if (Co|mponents|
|000024f0| 5b 49 6e 64 65 78 5d 2e | 4d 65 6e 75 53 74 61 74 |[Index].|MenuStat|
|00002500| 65 21 3d 4d 53 41 54 5f | 44 69 73 61 62 6c 65 64 |e!=MSAT_|Disabled|
|00002510| 29 0d 0a 20 20 20 20 20 | 20 20 20 7b 0d 0a 20 20 |).. | {.. |
|00002520| 20 20 20 20 20 20 09 43 | 6f 6d 70 6f 6e 65 6e 74 | .C|omponent|
|00002530| 73 5b 49 6e 64 65 78 5d | 2e 53 65 74 46 6f 63 75 |s[Index]|.SetFocu|
|00002540| 73 28 4e 6f 6e 65 29 3b | 0d 0a 20 20 20 20 20 20 |s(None);|.. |
|00002550| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 74 72 75 | re|turn tru|
|00002560| 65 3b 0d 0a 20 20 20 20 | 20 20 20 20 7d 0d 0a 0d |e;.. | }...|
|00002570| 0a 20 20 20 20 20 20 20 | 20 49 6e 64 65 78 2d 2d |. | Index--|
|00002580| 3b 0d 0a 20 20 20 20 7d | 0d 0a 0d 0a 20 20 20 20 |;.. }|.... |
|00002590| 69 66 20 28 20 53 75 70 | 65 72 2e 50 72 65 76 43 |if ( Sup|er.PrevC|
|000025a0| 6f 6e 74 72 6f 6c 28 73 | 65 6c 66 29 20 29 0d 0a |ontrol(s|elf) )..|
|000025b0| 20 20 20 20 20 20 20 09 | 72 65 74 75 72 6e 20 74 | .|return t|
|000025c0| 72 75 65 3b 0d 0a 20 20 | 20 20 65 6c 73 65 0d 0a |rue;.. | else..|
|000025d0| 20 20 20 20 20 20 20 09 | 72 65 74 75 72 6e 20 46 | .|return F|
|000025e0| 6f 63 75 73 4c 61 73 74 | 28 6e 6f 6e 65 29 3b 0d |ocusLast|(none);.|
|000025f0| 0a 0d 0a 7d 0d 0a 0d 0a | 66 75 6e 63 74 69 6f 6e |...}....|function|
|00002600| 20 73 74 72 69 6e 67 20 | 4c 6f 61 64 49 4e 49 28 | string |LoadINI(|
|00002610| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 69 6e 74 |)..{...l|ocal int|
|00002620| 20 69 3b 0d 0a 0d 0a 09 | 66 6f 72 20 28 69 3d 30 | i;.....|for (i=0|
|00002630| 3b 69 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;i<Contr|ols.Leng|
|00002640| 74 68 3b 69 2b 2b 29 0d | 0a 09 09 43 6f 6e 74 72 |th;i++).|...Contr|
|00002650| 6f 6c 73 5b 69 5d 2e 4c | 6f 61 64 49 4e 49 28 29 |ols[i].L|oadINI()|
|00002660| 3b 0d 0a 0d 0a 09 72 65 | 74 75 72 6e 20 53 75 70 |;.....re|turn Sup|
|00002670| 65 72 2e 4c 6f 61 64 49 | 4e 49 28 29 3b 0d 0a 7d |er.LoadI|NI();..}|
|00002680| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 53 61 76 |....func|tion Sav|
|00002690| 65 49 4e 49 28 73 74 72 | 69 6e 67 20 56 61 6c 75 |eINI(str|ing Valu|
|000026a0| 65 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |e)..{...|local in|
|000026b0| 74 20 69 3b 0d 0a 0d 0a | 09 66 6f 72 20 28 69 3d |t i;....|.for (i=|
|000026c0| 30 3b 69 3c 43 6f 6e 74 | 72 6f 6c 73 2e 4c 65 6e |0;i<Cont|rols.Len|
|000026d0| 67 74 68 3b 69 2b 2b 29 | 0d 0a 09 09 43 6f 6e 74 |gth;i++)|....Cont|
|000026e0| 72 6f 6c 73 5b 69 5d 2e | 53 61 76 65 49 4e 49 28 |rols[i].|SaveINI(|
|000026f0| 22 22 29 3b 0d 0a 0d 0a | 09 53 75 70 65 72 2e 53 |"");....|.Super.S|
|00002700| 61 76 65 49 4e 49 28 56 | 61 6c 75 65 29 3b 0d 0a |aveINI(V|alue);..|
|00002710| 0d 0a 09 72 65 74 75 72 | 6e 3b 0d 0a 7d 0d 0a 0d |...retur|n;..}...|
|00002720| 0a 65 76 65 6e 74 20 4d | 65 6e 75 53 74 61 74 65 |.event M|enuState|
|00002730| 43 68 61 6e 67 65 28 65 | 4d 65 6e 75 53 74 61 74 |Change(e|MenuStat|
|00002740| 65 20 4e 65 77 73 74 61 | 74 65 29 0d 0a 7b 0d 0a |e Newsta|te)..{..|
|00002750| 0d 0a 09 6c 6f 63 61 6c | 20 69 6e 74 20 69 3b 0d |...local| int i;.|
|00002760| 0a 0d 0a 09 69 66 20 28 | 4e 65 77 53 74 61 74 65 |....if (|NewState|
|00002770| 3d 3d 4d 53 41 54 5f 44 | 69 73 61 62 6c 65 64 29 |==MSAT_D|isabled)|
|00002780| 0d 0a 09 7b 0d 0a 09 09 | 66 6f 72 20 28 69 3d 30 |...{....|for (i=0|
|00002790| 3b 69 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;i<Contr|ols.Leng|
|000027a0| 74 68 3b 69 2b 2b 29 0d | 0a 09 09 09 43 6f 6e 74 |th;i++).|....Cont|
|000027b0| 72 6f 6c 73 5b 69 5d 2e | 4d 65 6e 75 53 74 61 74 |rols[i].|MenuStat|
|000027c0| 65 43 68 61 6e 67 65 28 | 4d 53 41 54 5f 44 69 73 |eChange(|MSAT_Dis|
|000027d0| 61 62 6c 65 64 29 3b 0d | 0a 09 7d 0d 0a 09 65 6c |abled);.|..}...el|
|000027e0| 73 65 0d 0a 09 7b 0d 0a | 09 09 66 6f 72 20 28 69 |se...{..|..for (i|
|000027f0| 3d 30 3b 69 3c 43 6f 6e | 74 72 6f 6c 73 2e 4c 65 |=0;i<Con|trols.Le|
|00002800| 6e 67 74 68 3b 69 2b 2b | 29 0d 0a 09 09 09 69 66 |ngth;i++|).....if|
|00002810| 20 28 43 6f 6e 74 72 6f | 6c 73 5b 69 5d 2e 4d 65 | (Contro|ls[i].Me|
|00002820| 6e 75 53 74 61 74 65 3d | 3d 4d 53 41 54 5f 44 69 |nuState=|=MSAT_Di|
|00002830| 73 61 62 6c 65 64 29 0d | 0a 09 09 09 09 43 6f 6e |sabled).|.....Con|
|00002840| 74 72 6f 6c 73 5b 69 5d | 2e 4d 65 6e 75 53 74 61 |trols[i]|.MenuSta|
|00002850| 74 65 43 68 61 6e 67 65 | 28 4d 53 41 54 5f 42 6c |teChange|(MSAT_Bl|
|00002860| 75 72 72 79 29 3b 0d 0a | 09 7d 0d 0a 0d 0a 09 53 |urry);..|.}.....S|
|00002870| 75 70 65 72 2e 4d 65 6e | 75 53 74 61 74 65 43 68 |uper.Men|uStateCh|
|00002880| 61 6e 67 65 28 4e 65 77 | 53 74 61 74 65 29 3b 0d |ange(New|State);.|
|00002890| 0a 7d 0d 0a 0d 0a 65 76 | 65 6e 74 20 53 65 74 56 |.}....ev|ent SetV|
|000028a0| 69 73 69 62 69 6c 69 74 | 79 28 62 6f 6f 6c 20 62 |isibilit|y(bool b|
|000028b0| 49 73 56 69 73 69 62 6c | 65 29 0d 0a 7b 0d 0a 09 |IsVisibl|e)..{...|
|000028c0| 6c 6f 63 61 6c 20 69 6e | 74 20 69 3b 0d 0a 0d 0a |local in|t i;....|
|000028d0| 09 53 75 70 65 72 2e 53 | 65 74 56 69 73 69 62 69 |.Super.S|etVisibi|
|000028e0| 6c 69 74 79 28 62 49 73 | 56 69 73 69 62 6c 65 29 |lity(bIs|Visible)|
|000028f0| 3b 0d 0a 0d 0a 20 20 20 | 20 69 66 20 28 20 21 50 |;.... | if ( !P|
|00002900| 72 6f 70 61 67 61 74 65 | 56 69 73 69 62 69 6c 69 |ropagate|Visibili|
|00002910| 74 79 20 29 0d 0a 20 20 | 20 20 09 72 65 74 75 72 |ty ).. | .retur|
|00002920| 6e 3b 0d 0a 0d 0a 20 20 | 20 20 66 6f 72 20 28 69 |n;.... | for (i|
|00002930| 3d 30 3b 69 3c 43 6f 6e | 74 72 6f 6c 73 2e 4c 65 |=0;i<Con|trols.Le|
|00002940| 6e 67 74 68 3b 69 2b 2b | 29 0d 0a 20 20 20 20 09 |ngth;i++|).. .|
|00002950| 43 6f 6e 74 72 6f 6c 73 | 5b 69 5d 2e 53 65 74 56 |Controls|[i].SetV|
|00002960| 69 73 69 62 69 6c 69 74 | 79 28 62 49 73 56 69 73 |isibilit|y(bIsVis|
|00002970| 69 62 6c 65 29 3b 0d 0a | 7d 0d 0a 0d 0a 65 76 65 |ible);..|}....eve|
|00002980| 6e 74 20 4f 70 65 6e 65 | 64 28 47 55 49 43 6f 6d |nt Opene|d(GUICom|
|00002990| 70 6f 6e 65 6e 74 20 53 | 65 6e 64 65 72 29 0d 0a |ponent S|ender)..|
|000029a0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 69 6e 74 20 69 3b |{...loca|l int i;|
|000029b0| 0d 0a 0d 0a 20 20 20 20 | 66 6f 72 20 28 69 3d 30 |.... |for (i=0|
|000029c0| 3b 69 3c 43 6f 6e 74 72 | 6f 6c 73 2e 4c 65 6e 67 |;i<Contr|ols.Leng|
|000029d0| 74 68 3b 69 2b 2b 29 0d | 0a 20 20 20 20 09 43 6f |th;i++).|. .Co|
|000029e0| 6e 74 72 6f 6c 73 5b 69 | 5d 2e 4f 70 65 6e 65 64 |ntrols[i|].Opened|
|000029f0| 28 53 65 6e 64 65 72 29 | 3b 0d 0a 7d 0d 0a 0d 0a |(Sender)|;..}....|
|00002a00| 65 76 65 6e 74 20 43 6c | 6f 73 65 64 28 47 55 49 |event Cl|osed(GUI|
|00002a10| 43 6f 6d 70 6f 6e 65 6e | 74 20 53 65 6e 64 65 72 |Componen|t Sender|
|00002a20| 2c 20 62 6f 6f 6c 20 62 | 43 61 6e 63 65 6c 6c 65 |, bool b|Cancelle|
|00002a30| 64 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |d)..{...|local in|
|00002a40| 74 20 69 3b 0d 0a 0d 0a | 20 20 20 20 66 6f 72 20 |t i;....| for |
|00002a50| 28 69 3d 30 3b 69 3c 43 | 6f 6e 74 72 6f 6c 73 2e |(i=0;i<C|ontrols.|
|00002a60| 4c 65 6e 67 74 68 3b 69 | 2b 2b 29 0d 0a 20 20 20 |Length;i|++).. |
|00002a70| 20 09 43 6f 6e 74 72 6f | 6c 73 5b 69 5d 2e 43 6c | .Contro|ls[i].Cl|
|00002a80| 6f 73 65 64 28 53 65 6e | 64 65 72 2c 20 62 43 61 |osed(Sen|der, bCa|
|00002a90| 6e 63 65 6c 6c 65 64 29 | 3b 0d 0a 7d 0d 0a 0d 0a |ncelled)|;..}....|
|00002aa0| 65 76 65 6e 74 20 46 72 | 65 65 28 29 20 09 09 09 |event Fr|ee() ...|
|00002ab0| 2f 2f 20 54 68 69 73 20 | 63 6f 6e 74 72 6f 6c 20 |// This |control |
|00002ac0| 69 73 20 6e 6f 20 6c 6f | 6e 67 65 72 20 6e 65 65 |is no lo|nger nee|
|00002ad0| 64 65 64 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 69 |ded..{..|.local i|
|00002ae0| 6e 74 20 69 3b 0d 0a 0d | 0a 20 20 20 20 66 6f 72 |nt i;...|. for|
|00002af0| 20 28 69 3d 30 3b 69 3c | 43 6f 6e 74 72 6f 6c 73 | (i=0;i<|Controls|
|00002b00| 2e 4c 65 6e 67 74 68 3b | 69 2b 2b 29 0d 0a 20 20 |.Length;|i++).. |
|00002b10| 20 20 7b 0d 0a 20 20 20 | 20 09 43 6f 6e 74 72 6f | {.. | .Contro|
|00002b20| 6c 73 5b 69 5d 2e 46 72 | 65 65 28 29 3b 0d 0a 20 |ls[i].Fr|ee();.. |
|00002b30| 20 20 20 20 20 20 20 43 | 6f 6e 74 72 6f 6c 73 5b | C|ontrols[|
|00002b40| 69 5d 20 3d 20 4e 6f 6e | 65 3b 0d 0a 20 20 20 20 |i] = Non|e;.. |
|00002b50| 7d 0d 0a 0d 0a 20 20 20 | 20 66 6f 72 20 28 69 3d |}.... | for (i=|
|00002b60| 30 3b 69 3c 43 6f 6d 70 | 6f 6e 65 6e 74 73 2e 4c |0;i<Comp|onents.L|
|00002b70| 65 6e 67 74 68 3b 69 2b | 2b 29 0d 0a 20 20 20 20 |ength;i+|+).. |
|00002b80| 09 43 6f 6d 70 6f 6e 65 | 6e 74 73 5b 69 5d 20 3d |.Compone|nts[i] =|
|00002b90| 20 4e 6f 6e 65 3b 0d 0a | 0d 0a 09 46 6f 63 75 73 | None;..|...Focus|
|00002ba0| 65 64 43 6f 6e 74 72 6f | 6c 20 3d 20 4e 6f 6e 65 |edContro|l = None|
|00002bb0| 3b 0d 0a 20 20 20 20 53 | 75 70 65 72 2e 46 72 65 |;.. S|uper.Fre|
|00002bc0| 65 28 29 3b 0d 0a 7d 0d | 0a 0d 0a 00 |e();..}.|.... |
+--------+-------------------------+-------------------------+--------+--------+